import request from "@/utils/request"
// 获取图片数据接口
export const reqSpuImageList = (spuId) => request({
        url: `/admin/product/spuImageList/${spuId}`,
        method: "get"
    })
    // 获取销售属性接口
export const reqSkuSaleAttrList = (spuId) => request({
        url: `/admin/product/spuSaleAttrList/${spuId}`,
        method: "get"
    })
    // 获取平台属性接口
export const reqAttrInfoList = (categor1Id, category2Id, category3Id) => request({
    url: `/admin/product/attrInfoList/${categor1Id}/${category2Id}/${category3Id}`,
    method: 'GET',
})
// 添加SKU
export const reqAddSku=(SkuInfo)=>request({
    url:`/admin/product/saveSkuInfo`,
    method:"post",
    data:SkuInfo
})
// 获取指定Sku列表接口
export const reqSkuList=(spuId)=>request({
    url:`/admin/product/findBySpuId/${spuId}`,
    method:"get"
})
// 获取所有Sku列表
export const reqAllSkuList=(page,limit)=>request({
    url:`/admin/product/list/${page}/${limit}`,
    method:"get"
})
// 上架sku接口
export const reqOnSale=(skuId)=>request({
    url:`/admin/product/onSale/${skuId}`,
    method:'get'
})
// 下架sku接口
export const reqCancelSale=(skuId)=>request({
    url:`/admin/product/cancelSale/${skuId}`,
    method:"get"
})
// Sku详情接口
export const reqSkuById=(skuId)=>request({
    url:`/admin/product/getSkuById/${skuId}`,
    method:"get"
})